import sys
import os

# 获取当前文件所在目录路径,将当前目录添加到系统路径
current_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(f"{current_dir}")

# import score
from .score import init as init2,load_models as load_models2,run as run2 

def init():
    print("---plugin_demo-init---demo----API------")
    # score.init()
    init2()

def load_models(path):
    """加载模型（假设是从 config.json 读取模型路径）"""
    print("---plugin_demo-load_models---demo-----API-----",path)
    # score.load_models(path)
    load_models2(path)

def run(data):
    """运行推理任务"""
    # return f"使用 {model} 处理数据: {data}"
    print("---plugin_demo-run---demo-----API-----",data)
    # score.run(data)
    run2(data)
    return data

def version():
    return "1.0.1"
